package com.vip.sys.modular.user.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author ASUS
 * @Date 2025/4/8 12:31
 * @Descripition
 */
@Getter
@AllArgsConstructor
public enum SexEnum {
    MAN(1,"男"),
    WOMAN(2,"女");
    private final Integer code;
    private final String name;
    public static String getName(Integer code) {
        for (SexEnum sexEnum : SexEnum.values()) {
            if (sexEnum.getCode().equals(code)) {
                return sexEnum.name;
            }
        }
        return "未知";
    }
}
